package com.zdpx.pxframework.system.api.api;

import com.zdpx.pxframework.core.constant.SecurityConstant;
import com.zdpx.pxframework.core.constant.ServiceNameConstant;
import com.zdpx.pxframework.core.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 远程调用角色部门数据权限数据
 *
 * @Description:
 * @Author: Cheng XiaoXiao
 * @Date: 2022/5/27 11:11
 */
@FeignClient(value = ServiceNameConstant.SYSTEM_SERVICE, url = "${px.open-feign.system-url}")
public interface RemoteRoleDepartmentDataScopeService {

    /**
     * 根据角色ID集合查询所关联的部门ID列表
     *
     * @param roleIds 角色ID
     * @return 结果信息
     */
    @GetMapping("/role-department-data-scope/department")
    Result<List<String>> listDeptsByRoleIds(@RequestParam("roleIds") List<String> roleIds, @RequestHeader(SecurityConstant.FROM_SOURCE) String source);
}
